.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\"	@(#)gettytab.5	6.3.1 (2.11BSD) 1997/3/28
.\"
.TH GETTYTAB 5 "March 28, 1997"
.UC 5
.SH NAME
gettytab \- terminal configuration data base
.SH SYNOPSIS
/etc/gettytab
.SH DESCRIPTION
.I Gettytab
is a simplified version of the
.IR termcap (5)
data base
used to describe terminal lines.
The initial terminal login process
.IR getty (8)
accesses the
.I gettytab
file each time it starts, allowing simpler
reconfiguration of terminal characteristics.
Each entry in the data base
is used to describe one class of terminals.
.PP
There is a default terminal class,
.IR default ,
that is used to set global defaults for all other classes.
(That is, the
.I default 
entry is read, then the entry for the class required
is used to override particular settings.)
.SH CAPABILITIES
Refer to
.IR termcap (5)
for a description of the file layout.
The
.I default
column below lists defaults obtained if there is
no entry in the table obtained, nor one in the special
.I default
table.
.nf

.ta \w'k0-k9  'u +\w'Type  'u +\w'``/bin/login"  'u
\fBName	Type	Default	Description\fR
ap	bool	false	terminal uses any parity
bk	str	0377	alternate end of line character (input break)
cb	bool	false	use crt backspace mode
ce	bool	false	use crt erase algorithm
ck	bool	false	use crt kill algorithm
cl	str	NULL	screen clear sequence
co	bool	false	console - add \\n after login prompt
ds	str	^Y	delayed suspend character
dx	bool	false	set DECCTLQ
ec	bool	false	leave echo \s-2OFF\s0
ep	bool	false	terminal uses even parity
er	str	^?	erase character
et	str	^D	end of text (\s-2EOF\s0) character
ev	str	NULL	initial enviroment
f0	num	unused	tty mode flags to write messages
f1	num	unused	tty mode flags to read login name
f2	num	unused	tty mode flags to leave terminal as
fl	str	^O	output flush character
hc	bool	false	do \s-2NOT\s0 hangup line on last close
he	str	NULL	hostname editing string
hf	bool	false	enable hardware (rts/cts) flow control
hn	str	hostname	hostname
ht	bool	false	terminal has real tabs
ig	bool	false	ignore garbage characters in login name
im	str	NULL	initial (banner) message
in	str	^C	interrupt character
is	num	unused	input speed
kl	str	^U	kill character
lc	bool	false	terminal has lower case
lm	str	login:	login prompt
ln	str	^V	``literal next'' character
lo	str	/bin/login	program to exec when name obtained
nl	bool	false	terminal has (or might have) a newline character
nx	str	default	next table (for auto speed selection)
op	bool	false	terminal uses odd parity
os	num	unused	output speed
pc	str	\\0	pad character
pe	bool	false	use printer (hard copy) erase algorithm
pf	num	0	delay between first prompt and following flush (seconds)
ps	bool	false	line connected to a MICOM port selector
qu	str	^\\	quit character
rp	str	^R	line retype character
rw	bool	false	do \s-2NOT\s0 use raw for input, use cbreak
sp	num	unused	line speed (input and output)
su	str	^Z	suspend character
tc	str	none	table continuation
to	num	0	timeout (seconds)
tt	str	NULL	terminal type (for enviroment)
ub	bool	false	do unbuffered output (of prompts etc)
we	str	^W	word erase character
xc	bool	false	do \s-2NOT\s0 echo control chars as ^X
xf	str	^S	XOFF (stop output) character
xn	str	^Q	XON (start output) character
.br
.fi
.PP
If no line speed is specified, speed will not be altered
from that which prevails when getty is entered.
Specifying an input or output speed will override
line speed for stated direction only.
.PP
Terminal modes to be used for the output of the message,
for input of the login name,
and to leave the terminal set as upon completion,
are derived from the boolean flags specified.
If the derivation should prove inadequate,
any (or all) of these three may be overriden
with one of the
.BR f0 ,
.BR f1 ", or"
.B f2
numeric specifications, which can be used to specify
(usually in octal, with a leading '0')
the exact values of the flags.
Local (new tty) flags are set in the top 16 bits
of this (32 bit) value.
.PP
Should
.I getty
receive a null character
(presumed to indicate a line break)
it will restart using the table indicated by the
.B nx
entry. If there is none, it will re-use its original table.
.PP
The
.B cl
screen clear string may be preceded by a (decimal) number
of milliseconds of delay required (a la termcap).
This delay is simulated by repeated use of the pad character
.BR pc .
.PP
The initial message, and login message,
.B im
and
.B lm
may include the character sequence \fB%h\fP or \fB%t\fP to obtain
the hostname or tty name respectively.
(\fB%%\fP obtains a single '%' character.)
The hostname is normally obtained from the system,
but may be set by the
.B hn
table entry.
In either case it may be edited with
.BR he .
The
.B he
string is a sequence of characters, each character that
is neither '@' nor '#' is copied into the final hostname.
A '@' in the
.B he
string, causes one character from the real hostname to
be copied to the final hostname.
A '#' in the
.B he
string, causes the next character of the real hostname
to be skipped.
Surplus '@' and '#' characters are ignored.
.PP
When getty execs the login process, given
in the
.B lo
string (usually "/bin/login"), it will have set
the enviroment to include the terminal type, as indicated
by the
.B tt
string (if it exists).
The
.B ev
string, can be used to enter additional data into
the environment.
It is a list of comma separated strings, each of which
will presumably be of the form
.IR name=value .
.PP
If a non-zero timeout is specified, with
.BR to ,
then getty will exit within the indicated
number of seconds, either having
received a login name and passed control
to
.IR login ,
or having received an alarm signal, and exited.
This may be useful to hangup dial in lines.
.PP
Output from
.I getty
is even parity unless
.B op
is specified.
.B Op
may be specified with
.B ap
to allow any parity on input, but generate odd parity output.
Note: this only applies while getty is being run,
terminal driver limitations prevent a more complete
implementation.
.I Getty
does not check parity of input characters in
.I RAW
mode.
.SH "SEE ALSO"
login(1),
termcap(5),
getty(8).
.SH BUGS
The special characters (erase, kill, etc.) are reset to system defaults
by
.IR login (1).
In
.B all
cases, '#' or '^H' typed in a login name will be treated as
an erase character, and '@' will be treated as a kill character.
.PP
The delay stuff is a real crock.  It has been removed from the system
entirely.
The
.B he
capability is stupid.
.PP
.I Termcap
format is horrid, something more rational should
have been chosen.
